import { createRouter, createWebHistory } from 'vue-router';
import LoginPage from '../views/LoginPage.vue';
import RegisterPage from '../views/RegisterPage.vue';
import HomePage from '../views/Home.vue';
import Personal from '../views/Personal.vue'
import Reset_email from '@/views/Reset_email.vue';
import Reset_password from '@/views/Reset_password.vue';
import SecondEditing from '@/views/SecondEditing.vue';

const routes = [
    { path: '/login', component: LoginPage },
    { path: '/register', component: RegisterPage },
    { path: '/home', component: HomePage },
    { path: '/personal', component: Personal },
    { path: '/reset_email', component: Reset_email },
    { path: '/reset_password', component: Reset_password },
    { path: '/second_editing', component: SecondEditing },
    { path: '/', redirect: '/login' } // 默认重定向到登录页面
];

const router = createRouter({
    history: createWebHistory(), // 使用 HTML5 历史模式
    routes
});

export default router;